﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RptCrmDeliveryList.aspx.cs"
    Inherits="ZX.WebApp.Crm.Report.RptCrmDeliveryList" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.10.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.10.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Styles/base.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/extendTable.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div class="fieldForm" id="fieldForm">
            <div id="content">
                <h3>
                    查询</h3>
                <table class="table1">
                    <tr>
                        <td width="10%" align="right">
                            开始时间
                        </td>
                        <td width="13%">
                            <input type="text" id="txtStartTime" style="vertical-align:bottom" runat="server" />
                        </td>
                        <td width="10%" align="right">
                            结束时间
                        </td>
                        <td>
                            <input type="text" id="txtEndTime" style="vertical-align:bottom" runat="server" />
                            <asp:Button ID="Button1" runat="server" Text="查询" Height="26" CssClass="btnCheck" />
                        </td>
                    </tr>
                </table>
            </div>
            <div class="extendDiv">
                <div>
                    <h3>
                        统计列表</h3>
                    <dx:ASPxGridView ID="gvProductList" ClientInstanceName="gvProductList" runat="server"
                        KeyFieldName="Caption" SettingsPager-AlwaysShowPager="true" SettingsPager-PageSize="10"
                        Width="100%">
                        <Columns>
                            <dx:GridViewDataTextColumn Caption="产品名称" FieldName="Caption" VisibleIndex="0">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="人数(总计)" FieldName="RenShu" VisibleIndex="1">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="家数(总计)" FieldName="JiaShu" VisibleIndex="2">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="成交家数(总计)" FieldName="SCount" VisibleIndex="3">
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <Templates>
                            <DetailRow>
                                <div>
                                    <dx:ASPxGridView ID="gvLayoutList" ClientInstanceName="gvLayoutList" runat="server"
                                        KeyFieldName="CourseLayoutName" DataSourceID="ObjectDataSource1" OnBeforePerformDataSelect="LayoutListGrid_DataSelect"
                                        SettingsPager-AlwaysShowPager="true" SettingsPager-PageSize="25" Width="100%">
                                        <Columns>
                                            <dx:GridViewDataTextColumn Caption="课程规划期数" FieldName="CourseLayoutName" VisibleIndex="0">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="人数(总计)" FieldName="RenShu" VisibleIndex="1">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="家数(总计)" FieldName="JiaShu" VisibleIndex="2">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="成交家数(总计)" FieldName="SCount" VisibleIndex="3">
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                        <Templates>
                                            <DetailRow>
                                                <div>
                                                    <dx:ASPxGridView ID="gvDeptList" ClientInstanceName="gvDeptList" runat="server" 
                                                        KeyFieldName="DeptName" DataSourceID="ObjectDataSource2" OnBeforePerformDataSelect="DeptListGrid_DataSelect"
                                                        SettingsPager-AlwaysShowPager="true" SettingsPager-PageSize="25" Width="100%">
                                                        <Columns>
                                                            <dx:GridViewDataTextColumn Caption="公司名称" FieldName="DeptName" VisibleIndex="0">
                                                            </dx:GridViewDataTextColumn>
                                                            <dx:GridViewDataTextColumn Caption="人数(总计)" FieldName="RenShu" VisibleIndex="1">
                                                            </dx:GridViewDataTextColumn>
                                                            <dx:GridViewDataTextColumn Caption="家数(总计)" FieldName="JiaShu" VisibleIndex="2">
                                                            </dx:GridViewDataTextColumn>
                                                            <dx:GridViewDataTextColumn Caption="成交家数(总计)" FieldName="SCount" VisibleIndex="3">
                                                            </dx:GridViewDataTextColumn>
                                                        </Columns>
                                                    </dx:ASPxGridView>
                                                </div>
                                            </DetailRow>
                                        </Templates>
                                        <SettingsDetail ShowDetailRow="True" />
                                    </dx:ASPxGridView>
                                </div>
                            </DetailRow>
                        </Templates>
                        <SettingsDetail ShowDetailRow="True" />
                    </dx:ASPxGridView>
                </div>
                <div class="navline" style="margin-top:20px; margin-bottom:0px;"></div>
            </div>
            
            <div class="extendDiv" style="display:none;">
                <div>
                    <h3>
                        内训统计</h3>
                    <dx:ASPxGridView ID="ASPxGridView1" ClientInstanceName="ASPxGridView1" runat="server"
                        KeyFieldName="ID" SettingsPager-AlwaysShowPager="true" SettingsPager-PageSize="10"
                        Width="100%">
                        <Columns>
                            <dx:GridViewDataTextColumn Caption="产品名称" FieldName="Name" VisibleIndex="0">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="未交付家数(总计)" FieldName="Number1" VisibleIndex="1">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="交付人数(总计)" FieldName="Number2" VisibleIndex="2">
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <Templates>
                            <DetailRow>
                                <div>
                                    <dx:ASPxGridView ID="ASPxGridView2" ClientInstanceName="ASPxGridView2" runat="server"
                                        KeyFieldName="DeptId" DataSourceID="ObjectDataSource3" OnBeforePerformDataSelect="ASPxGridView2Grid_DataSelect"
                                        SettingsPager-AlwaysShowPager="true" SettingsPager-PageSize="25" Width="100%">
                                        <Columns>
                                            <dx:GridViewDataTextColumn Caption="公司名称" FieldName="MonthName" VisibleIndex="0">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="未交付家数" FieldName="MonthNumber1" VisibleIndex="1">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="未交付人数" FieldName="MonthNumber2" VisibleIndex="2">
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                    </dx:ASPxGridView>
                                </div>
                            </DetailRow>
                        </Templates>
                        <SettingsDetail ShowDetailRow="True" />
                    </dx:ASPxGridView>
                </div>
                <div class="navline" style="margin-top:20px; margin-bottom:0px;"></div>
            </div>
            <div class="extendDiv" style="display:none;">
                <div>
                    <h3>
                        项目统计</h3>
                    <dx:ASPxGridView ID="ASPxGridView3" ClientInstanceName="ASPxGridView3" runat="server"
                        KeyFieldName="ID" SettingsPager-AlwaysShowPager="true" SettingsPager-PageSize="10"
                        Width="100%">
                        <Columns>
                            <dx:GridViewDataTextColumn Caption="产品名称" FieldName="Name" VisibleIndex="0">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="未交付家数(总计)" FieldName="Number1" VisibleIndex="1">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="交付人数(总计)" FieldName="Number2" VisibleIndex="2">
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <Templates>
                            <DetailRow>
                                <div>
                                    <dx:ASPxGridView ID="ASPxGridView4" ClientInstanceName="ASPxGridView4" runat="server"
                                        KeyFieldName="DeptId" DataSourceID="ObjectDataSource4" OnBeforePerformDataSelect="ASPxGridView4Grid_DataSelect"
                                        SettingsPager-AlwaysShowPager="true" SettingsPager-PageSize="25" Width="100%">
                                        <Columns>
                                            <dx:GridViewDataTextColumn Caption="公司名称" FieldName="MonthName" VisibleIndex="0">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="未交付家数" FieldName="MonthNumber1" VisibleIndex="1">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="未交付人数" FieldName="MonthNumber2" VisibleIndex="2">
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                    </dx:ASPxGridView>
                                </div>
                            </DetailRow>
                        </Templates>
                        <SettingsDetail ShowDetailRow="True" />
                    </dx:ASPxGridView>
                </div>
            </div>
        </div>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAllLayoutList"
            TypeName="ZX.CRM.Library.RptAllCustomerInfo">
            <SelectParameters>
                <asp:SessionParameter DbType="String" Name="productId" SessionField="productId" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetAllDeptList"
            TypeName="ZX.CRM.Library.RptAllCustomerInfo">
            <SelectParameters>
                <asp:SessionParameter DbType="String" Name="layoutId" SessionField="layoutId" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" SelectMethod="GetAllTrainList"
            TypeName="ZX.CRM.Library.RptAllCustomerInfo">
            <SelectParameters>
                <asp:SessionParameter DbType="String" Name="trainId" SessionField="trainId" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:ObjectDataSource ID="ObjectDataSource4" runat="server" SelectMethod="GetAllProjectList"
            TypeName="ZX.CRM.Library.RptAllCustomerInfo">
            <SelectParameters>
                <asp:SessionParameter DbType="String" Name="projectId" SessionField="projectId" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    </form>
</body>
</html>
